Skip to content

Conversation

@mjain-jump
Copy link
Contributor

In FD, we have get_state() implemented and used instead of implementing Agave's custom deserializers for vote states. To simplify the deserialization logic, InvalidAccountData should be thrown to match the error semantics of get_state() in fuzz-generated cases where v0_23_5 vote accounts have invalid data.

Copy link
Contributor

@buffalojoec buffalojoec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Originally I did this on purpose, since we decided v0 accounts would be treated as uninitialized, since they're phased out.

We can either do this here, to align with the v3 and v4 deserializers...

Err(InstructionError::InvalidAccountData)

Err(InstructionError::InvalidAccountData)

...or we can use UnitializedAccount everywhere.

I suppose InvalidAccountData is closer to the actual case itself - the account layout is invalid, because it's been phased out. I vote ship it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants